package com.hlingsoft.kkh.dao;

import com.hlingsoft.kkh.entity.Collect;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 用户服务
 *
 * @author Zhang jiale
 *
 */

@Repository
public interface CollectDao {


	/**
	 * 点赞
	 *
	 * @param collect
	 * @return Integer
	 */
	public int addCollect(Collect collect);


	public List<Collect> getByEventsId(@Param("eventsId")long eventsId,@Param("offset")int offset,@Param("rows")int rows);

	public List<Collect> getAllByEventsId(@Param("eventsId")long eventsId);

	public int getByEventsIdCount(@Param("eventsId")long eventsId);


	public Collect getByIds(@Param("appUserId")long appUserId,@Param("eventsId")long eventsId);



	public Collect getByIdsWithNone(@Param("appUserId")long appUserId,@Param("eventsId")long eventsId);


	public Integer updateCollect(Collect collect);

	/**
	 * 用户收藏
	 * @param appUserId
	 * @param offset
	 * @param rows
	 * @return
	 */
	public List<Collect> getByAppUserId(@Param("appUserId")long appUserId,@Param("offset")int offset,@Param("rows")int rows);

	/**
	 * 获取用户收藏(包括删除的)
	 * @param appUserId
	 * @return
	 */
	public List<Collect> getByAppUserIdWithNone(@Param("appUserId")long appUserId);

	public List<Collect> getByAppUserId(@Param("appUserId")long appUserId);


	public int getByAppUserIdCount(@Param("appUserId")long appUserId);

}
